package com.ruoyi.exam.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 考试记录对象 p_exam_record_log
 *
 * @author jiadun
 * @date 2022-01-10
 */
@Data
public class PExamRecordLog extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 考试用户的id */
    @Excel(name = "考试用户的id")
    private Long userId;

    /** 用户的答案列表 */
    @Excel(name = "用户的答案列表")
    private String userAnswers;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String creditImgUrl;

    /** 考试的id */
    @Excel(name = "考试的id")
    private Long examId;

    /** 考试的逻辑得分(除简答) */
    @Excel(name = "考试的逻辑得分(除简答)")
    private Long logicScore;

    /** 考试时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "考试时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date examTime;

    /** 考试的题目信息 */
    @Excel(name = "考试的题目信息")
    private String questionIds;

    /** 考试总分数 (逻辑+简答) */
    @Excel(name = "考试总分数 (逻辑+简答)")
    private Long totalScore;

    /** 用户考试的错题 */
    @Excel(name = "用户考试的错题")
    private String errorQuestionIds;

    private String scores;

    private Integer status;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }
    public void setUserAnswers(String userAnswers)
    {
        this.userAnswers = userAnswers;
    }

    public String getUserAnswers()
    {
        return userAnswers;
    }
    public void setCreditImgUrl(String creditImgUrl)
    {
        this.creditImgUrl = creditImgUrl;
    }

    public String getCreditImgUrl()
    {
        return creditImgUrl;
    }
    public void setExamId(Long examId)
    {
        this.examId = examId;
    }

    public Long getExamId()
    {
        return examId;
    }
    public void setLogicScore(Long logicScore)
    {
        this.logicScore = logicScore;
    }

    public Long getLogicScore()
    {
        return logicScore;
    }
    public void setExamTime(Date examTime)
    {
        this.examTime = examTime;
    }

    public Date getExamTime()
    {
        return examTime;
    }
    public void setQuestionIds(String questionIds)
    {
        this.questionIds = questionIds;
    }

    public String getQuestionIds()
    {
        return questionIds;
    }
    public void setTotalScore(Long totalScore)
    {
        this.totalScore = totalScore;
    }

    public Long getTotalScore()
    {
        return totalScore;
    }
    public void setErrorQuestionIds(String errorQuestionIds)
    {
        this.errorQuestionIds = errorQuestionIds;
    }

    public String getErrorQuestionIds()
    {
        return errorQuestionIds;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("userAnswers", getUserAnswers())
            .append("creditImgUrl", getCreditImgUrl())
            .append("examId", getExamId())
            .append("logicScore", getLogicScore())
            .append("examTime", getExamTime())
            .append("questionIds", getQuestionIds())
            .append("totalScore", getTotalScore())
            .append("errorQuestionIds", getErrorQuestionIds())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
